<template>
  <div class="main-contain">
    <Editor v-model:content="val" @update:content="recive" @submit="submit" />
  </div>
</template>
<script lang="ts">
export default {
  name: "Contribute", // keep-alive中include属性匹配组件name,就是给组件命个命哈
};
</script>
<script lang="ts" setup>
import { ref } from "vue";
import Editor from "@/components/Editor.vue";
let val = ref("");//传递内容
const recive=(content:string)=>{
  val.value=content
}
const submit = (msg: { value: any; call: () => void; }) => {//标题
  console.log(val.value);
  msg.call()
};
</script>
<style>
.main-contain {
  height: 100%;
  position: relative;
}
</style>
